<template>
  <div class="dropdown">
    <Editable v-model="data.title" />
    <el-radio-group v-if="isEdit" v-model="data.value" class="radio-group">
      <div v-for="item in options" :key="item.value" class="option">
        <el-radio :value="item.value"> </el-radio>
        <Editable class="label" v-model="item.label" />
      </div>
    </el-radio-group>
    <el-select v-else v-model="data.value" class="radio-group">
      <div v-for="item in options" :key="item.value" class="option">
        <el-option :value="item.value" :label="item.label"></el-option>
        <!-- <Editable class="label" v-model="item.label" @click="onClick(item)" /> -->
      </div>
    </el-select>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
const props = defineProps<{
  data: any
  isEdit?: boolean
}>()
const options = props.data.data
</script>

<style lang="scss" scoped>
@import url(./questionCommon.scss);
</style>
